/ Assembly List / LJCNetCommon / NetString / GetDelimitedString

Namespace - LJCNetCommon


Parameters
text - The text value.
beginDelimiter - The beginning delimiter.
startIndex - The starting index.
endDelimiter - The ending delimiter.

Returns

The text between the delimiters.

Syntax

C#
public static String GetDelimitedString(String text, String beginDelimiter, Int32& startIndex, String endDelimiter)

Gets the string between the specified delimiters.

Example

C#
using LJCNetCommon;
        
// Gets the string between the specified delimiters.
private static void GetDelimitedString()
{
  var source = "<summary>This is some text.</summary>";
  var startIndex = 0;
  var beginDelimiter = "<summary>";
  var endDelimiter = "</summary>";

  var text = NetString.GetDelimitedString(source, beginDelimiter, ref startIndex
    , endDelimiter);
  // text = "This is some text.";
  // startIndex = -1;
}

Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.